home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 3.6 KB | 106 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: BmpFrame.h
- // Release Version: $ 1.0d11 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef BMPFRAME_H
- #define BMPFRAME_H
-
- // ----- Framework Includes -----
-
- #ifndef FWFRAME_H
- #include "FWFrame.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma import on
- #endif
- class FW_CLASS_ATTR FW_CGrowBox;
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma import off
- #endif
-
- class FW_CLASS_ATTR CBitmapPart;
- class FW_CLASS_ATTR CBitmapSelection;
-
- //========================================================================================
- // class CBitmapFrame
- //========================================================================================
-
- class FW_CLASS_ATTR CBitmapFrame : public FW_CFrame
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CBitmapFrame(Environment* ev, ODFrame* odFrame, FW_CPresentation* presentation, CBitmapPart* bitmapPart);
- virtual ~ CBitmapFrame();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual FW_Boolean DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
- virtual FW_Boolean DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
-
- virtual void FocusStateChanged(Environment* ev, ODTypeToken focus, FW_Boolean newState, ODFrame* newOwner);
- virtual void FrameShapeChanged(Environment* ev);
-
- virtual ODShape* AdjustUsedShape(Environment* ev, ODShape* suggestedUsedShape);
- virtual ODShape* AdjustActiveShape(Environment* ev, ODFacet* facet, ODShape* suggestedActiveShape);
-
- virtual void AdjustZoomedWindowSize(Environment *ev, FW_CPoint& proposedSize);
-
- virtual void Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
- virtual void BuildThumbnail(Environment* ev, FW_CGraphicContext& gc, const FW_CRect& bounds);
-
- virtual FW_Boolean DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
-
- #ifdef FW_BUILD_MAC
- virtual ODDragResult CanAcceptDrop(Environment* ev, ODDragItemIterator* dragInfo);
- #endif
-
- virtual FW_Boolean DoIdle(Environment* ev, const FW_CNullEvent& theNullEvent);
-
- virtual void CreateSubviews(Environment* ev);
- virtual void AdjustSubviews(Environment* ev);
-
- // ----- External/InternalizeFrame -----
- virtual void ExternalizeFrame(Environment* ev, ODStorageUnitView* storageUnitView);
- virtual void InternalizeFrame(Environment* ev, ODStorageUnitView* storageUnitView);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- FW_CPoint GetZoomRatio(Environment* ev) const;
- void AdjustFrameSize(Environment* ev);
-
- void CalcUsedRect(Environment* ev, FW_CRect& newUsedRect) const;
-
- ODCommandID GetChoosenSize() const
- {return fChoosenSize;}
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CBitmapPart* fBitmapPart; // Pointer to my part (to ovoid type cast)
- ODCommandID fChoosenSize; // Choosen Size (50%, 100%, 200%, or fit to frame)
- FW_CRect fFrameRect; // The lastest frame shape rect
- FW_CGrowBox* fGrowBox;
- CBitmapSelection* fSelection;
- };
-
- #endif
-